package com.szrt.javaweb;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping("/rest")
public class RESTController {
	//http://localhost:8080/mvn-springmvc-01-1609/rest
	@RequestMapping(method=RequestMethod.POST)
	public String add(String id){
		System.out.println("进入add方法...");
		return "success";
	}
	@RequestMapping(method=RequestMethod.DELETE)
	public String delete(String id){
		System.out.println("进入delete方法...");
		return "success";
	}
	@RequestMapping(method=RequestMethod.PUT)
	public String update(String id){
		System.out.println("进入update方法...");
		return "success";
	}
	@RequestMapping(method=RequestMethod.GET)
	public String findById(String id){
		System.out.println("进入find方法...");
		return "success";
	}
	
	

}
